/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exercicio.lista1;

/**
 *
 * @author portal
 */
public class Questao7 {
    public static void main(String[] args) {
        double juros = 0;
        double divida = 40000;
        do {
            juros += 0.000001;
            divida = 40000;
            for (int i = 0; i < 10; i++) {
                divida = divida + divida * juros - 4400;
            }
        } while (divida < -0.5 || divida > 0 );
        System.out.println("Divida final: " + divida);
        System.out.println("Juros: " + juros);
    }
}
